fix a bunch of tests with regexp
authorAleksey Kladov <aleksey.kladov@gmail.com>
Sat, 14 May 2016 21:15:22 +0000 (00:15 +0300)
committerAleksey Kladov <aleksey.kladov@gmail.com>
Wed, 18 May 2016 22:42:29 +0000 (01:42 +0300)
17 files changed:
tests/test_cargo_bench.rs
tests/test_cargo_cfg.rs
tests/test_cargo_compile_custom_build.rs
tests/test_cargo_compile_git_deps.rs
tests/test_cargo_compile_path_deps.rs
tests/test_cargo_compile_plugins.rs
tests/test_cargo_concurrent.rs
tests/test_cargo_cross_compile.rs
tests/test_cargo_doc.rs
tests/test_cargo_features.rs
tests/test_cargo_freshness.rs
tests/test_cargo_install.rs
tests/test_cargo_overrides.rs
tests/test_cargo_package.rs
tests/test_cargo_registry.rs
tests/test_cargo_rustc.rs
tests/test_cargo_test.rs

index b75207a4c7e02c44868c2aaccd09324a19731959..fcff692e239db0b7291791c974feaec64d6465d3 100644 (file)
@@ -929,7 +929,7 @@ test!(test_bench_no_run {
 
     assert_that(p.cargo_process("bench").arg("--no-run"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] foo v0.1.0 ([..])
 "));
 });
index 490a4c56482eb34bc41f7eb054bb817ffc4743f2..3d45b7fea4359399242165e35205fec9ad2be8a9 100644 (file)
@@ -184,7 +184,7 @@ test!(dont_include {
         "#)
         .file("b/src/lib.rs", "");
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] a v0.0.1 ([..])
 "));
 });
@@ -211,7 +211,7 @@ test!(works_through_the_registry {
         .file("src/lib.rs", "extern crate bar;");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry [..]
 [DOWNLOADING] [..]
 [DOWNLOADING] [..]
index 6a4d3679ee7c732de013c063fa8357c5d9e9da0f..4102e1d443d7c3d10d699b890c95edb47739b357 100644 (file)
@@ -289,7 +289,7 @@ test!(overrides_and_links {
 
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [..]
 [..]
 [..]
@@ -386,7 +386,7 @@ test!(only_rerun_build_script {
 
     assert_that(p.cargo("build").arg("-v"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] foo v0.5.0 (file://[..])
 [RUNNING] `[..]build-script-build[..]`
 [RUNNING] `rustc [..] --crate-name foo [..]`
@@ -494,7 +494,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
     println!("doc");
     assert_that(p.cargo("doc").arg("-v"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [DOCUMENTING] foo v0.5.0 (file://[..])
 [RUNNING] `rustdoc [..]`
 "));
@@ -504,7 +504,7 @@ test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured
     println!("run");
     assert_that(p.cargo("run"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] foo v0.5.0 (file://[..])
 [RUNNING] `target[..]foo[..]`
 "));
@@ -642,7 +642,7 @@ test!(build_deps_simple {
 
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] a v0.5.0 (file://[..])
 [RUNNING] `rustc [..] --crate-name a [..]`
 [COMPILING] foo v0.5.0 (file://[..])
@@ -819,7 +819,7 @@ test!(output_separate_lines {
         "#);
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(101)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] foo v0.5.0 (file://[..])
 [RUNNING] `rustc build.rs [..]`
 [RUNNING] `[..]foo-[..]build-script-build[..]`
@@ -845,7 +845,7 @@ test!(output_separate_lines_new {
         "#);
     assert_that(p.cargo_process("build").arg("-v"),
                 execs().with_status(101)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] foo v0.5.0 (file://[..])
 [RUNNING] `rustc build.rs [..]`
 [RUNNING] `[..]foo-[..]build-script-build[..]`
@@ -1617,7 +1617,7 @@ test!(diamond_passes_args_only_once {
         .file("c/src/lib.rs", "");
 
     assert_that(p.cargo_process("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] c v0.5.0 ([..]
 [RUNNING] `rustc [..]`
 [RUNNING] `[..]`
@@ -1651,7 +1651,7 @@ test!(adding_an_override_invalidates {
         "#);
 
     assert_that(p.cargo_process("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] foo v0.5.0 ([..]
 [RUNNING] `rustc [..]`
 [RUNNING] `[..]`
@@ -1664,7 +1664,7 @@ test!(adding_an_override_invalidates {
     ", target).as_bytes()).unwrap();
 
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] foo v0.5.0 ([..]
 [RUNNING] `rustc [..] -L native=bar`
 "));
@@ -1689,7 +1689,7 @@ test!(changing_an_override_invalidates {
         .file("build.rs", "");
 
     assert_that(p.cargo_process("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] foo v0.5.0 ([..]
 [RUNNING] `rustc [..] -L native=foo`
 "));
@@ -1700,7 +1700,7 @@ test!(changing_an_override_invalidates {
     ", target).as_bytes()).unwrap();
 
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] foo v0.5.0 ([..]
 [RUNNING] `rustc [..] -L native=bar`
 "));
@@ -1730,7 +1730,7 @@ test!(rebuild_only_on_explicit_paths {
     // files don't exist, so should always rerun if they don't exist
     println!("run without");
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] a v0.5.0 ([..])
 [RUNNING] `[..]build-script-build[..]`
 [RUNNING] `rustc src[..]lib.rs [..]`
@@ -1743,7 +1743,7 @@ test!(rebuild_only_on_explicit_paths {
     // now the exist, so run once, catch the mtime, then shouldn't run again
     println!("run with");
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] a v0.5.0 ([..])
 [RUNNING] `[..]build-script-build[..]`
 [RUNNING] `rustc src[..]lib.rs [..]`
@@ -1751,7 +1751,7 @@ test!(rebuild_only_on_explicit_paths {
 
     println!("run with2");
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [FRESH] a v0.5.0 ([..])
 "));
 
@@ -1761,7 +1761,7 @@ test!(rebuild_only_on_explicit_paths {
     println!("run baz");
     File::create(p.root().join("baz")).unwrap();
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [FRESH] a v0.5.0 ([..])
 "));
 
@@ -1769,7 +1769,7 @@ test!(rebuild_only_on_explicit_paths {
     println!("run foo change");
     File::create(p.root().join("foo")).unwrap();
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] a v0.5.0 ([..])
 [RUNNING] `[..]build-script-build[..]`
 [RUNNING] `rustc src[..]lib.rs [..]`
@@ -1779,7 +1779,7 @@ test!(rebuild_only_on_explicit_paths {
     println!("run foo delete");
     fs::remove_file(p.root().join("bar")).unwrap();
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] a v0.5.0 ([..])
 [RUNNING] `[..]build-script-build[..]`
 [RUNNING] `rustc src[..]lib.rs [..]`
index 28e7ffd757221b04e0c3ed4b43af37a41b072cc4..b6080442e43585af73e1c061833583650ac68338 100644 (file)
@@ -1553,7 +1553,7 @@ test!(switch_sources {
     p.build();
     assert_that(p.cargo("build"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [UPDATING] git repository `file://[..]a1`
 [COMPILING] a v0.5.0 ([..]a1#[..]
 [COMPILING] b v0.5.0 ([..])
@@ -1571,7 +1571,7 @@ test!(switch_sources {
 
     assert_that(p.cargo("build"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [UPDATING] git repository `file://[..]a2`
 [COMPILING] a v0.5.1 ([..]a2#[..]
 [COMPILING] b v0.5.0 ([..])
@@ -1677,7 +1677,7 @@ test!(lints_are_suppressed {
         .file("src/lib.rs", "");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] git repository `[..]`
 [COMPILING] a v0.5.0 ([..])
 [COMPILING] foo v0.0.1 ([..])
@@ -1714,7 +1714,7 @@ test!(denied_lints_are_allowed {
         .file("src/lib.rs", "");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] git repository `[..]`
 [COMPILING] a v0.5.0 ([..])
 [COMPILING] foo v0.0.1 ([..])
index 4ac9e2a15a43fbe65ab3c49329af6d10a8604d12..5589f0ef75e0b42e38e10847c709bf2b93345578 100644 (file)
@@ -783,7 +783,7 @@ test!(custom_target_no_rebuild {
     p.build();
     assert_that(p.cargo("build"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] a v0.5.0 ([..])
 [COMPILING] foo v0.5.0 ([..])
 "));
@@ -792,7 +792,7 @@ test!(custom_target_no_rebuild {
                  .arg("--manifest-path=b/Cargo.toml")
                  .env("CARGO_TARGET_DIR", "target"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] b v0.5.0 ([..])
 "));
 });
@@ -831,7 +831,7 @@ test!(override_and_depend {
     p.build();
     assert_that(p.cargo("build").cwd(p.root().join("b")),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] a2 v0.5.0 ([..])
 [COMPILING] a1 v0.5.0 ([..])
 [COMPILING] b v0.5.0 ([..])
index 3d4541fa42213a4f1c2b58bcfc5917ec11e2e644..655de4d16ca34b0d55ae479e76098725a8f282ed 100644 (file)
@@ -262,7 +262,7 @@ test!(native_plugin_dependency_with_custom_ar_linker {
 
     foo.build();
     assert_that(bar.cargo_process("build").arg("--verbose"),
-                execs().with_stdout("\
+                execs().with_stderr("\
 [COMPILING] foo v0.0.1 ([..])
 [RUNNING] `rustc [..] -C ar=nonexistent-ar -C linker=nonexistent-linker [..]`
 "));
index eb778f41c3250fd3e2191665f870592342465a4b..8c73bdbcd1c4f52e9cdd3aebd05d926c97cbb151 100644 (file)
@@ -409,10 +409,10 @@ test!(debug_release_ok {
     let b = b.wait_with_output().unwrap();
     let a = a.join().unwrap();
 
-    assert_that(a, execs().with_status(0).with_stdout("\
+    assert_that(a, execs().with_status(0).with_stderr("\
 [COMPILING] foo v0.0.0 [..]
 "));
-    assert_that(b, execs().with_status(0).with_stdout("\
+    assert_that(b, execs().with_status(0).with_stderr("\
 [COMPILING] foo v0.0.0 [..]
 "));
 });
index 643431ef8a71011caef9bc45a57a4f43cded89cc..1a9f4c585efa70edd8d70f12bbb71b1f31ecb593 100644 (file)
@@ -789,7 +789,7 @@ test!(plugin_build_script_right_arch {
 
     assert_that(p.cargo_process("build").arg("-v").arg("--target").arg(alternate()),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] foo v0.0.1 ([..])
 [RUNNING] `rustc build.rs [..]`
 [RUNNING] `[..]build-script-build[..]`
index dc1b32b603690a5915de3666ff7103445875df0c..647c8b1d6eec91298feb748c855306aee4e492a5 100644 (file)
@@ -240,7 +240,7 @@ test!(doc_dash_p {
 
     assert_that(p.cargo_process("doc").arg("-p").arg("a"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [..] b v0.0.1 (file://[..])
 [..] b v0.0.1 (file://[..])
 [DOCUMENTING] a v0.0.1 (file://[..])
@@ -426,7 +426,7 @@ test!(doc_release {
                 execs().with_status(0));
     assert_that(p.cargo("doc").arg("--release").arg("-v"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [DOCUMENTING] foo v0.0.1 ([..])
 [RUNNING] `rustdoc src[..]lib.rs [..]`
 "));
index b3c73db7a27ed77c66ec0928abb2dc5eafb72412..6b0335c4cc76ec8f7a13a93836ab868c46667220 100644 (file)
@@ -538,7 +538,7 @@ test!(many_features_no_rebuilds {
     p.root().move_into_the_past().unwrap();
 
     assert_that(p.cargo("build").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [FRESH] a v0.1.0 ([..]/a)
 [FRESH] b v0.1.0 ([..])
 "));
@@ -764,7 +764,7 @@ test!(optional_and_dev_dep {
         .file("foo/src/lib.rs", "");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] test v0.1.0 ([..])
 "));
 });
index 6272254792f1131e5681fe87b4c48750e92424e2..6655824d7d5433607c1900677129e83b3874db9d 100644 (file)
@@ -151,19 +151,19 @@ test!(changing_features_is_ok {
 
     assert_that(p.cargo_process("build"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [..]Compiling foo v0.0.1 ([..])
 "));
 
     assert_that(p.cargo("build").arg("--features").arg("foo"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [..]Compiling foo v0.0.1 ([..])
 "));
 
     assert_that(p.cargo("build"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [..]Compiling foo v0.0.1 ([..])
 "));
 
@@ -249,7 +249,7 @@ test!(no_rebuild_transitive_target_deps {
                 execs().with_status(0));
     assert_that(p.cargo("test").arg("--no-run"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] c v0.0.1 ([..])
 [COMPILING] b v0.0.1 ([..])
 [COMPILING] foo v0.0.1 ([..])
index 85c0515ba448cae3b395587d0df6c39d1ae7e867..ba8b8a6134ddb3dce06ed8d7af979cb0b1ac2f9c 100644 (file)
@@ -619,7 +619,7 @@ test!(uninstall_piecemeal {
     assert_that(cargo_home(), has_installed_exe("bar"));
 
     assert_that(cargo_process("uninstall").arg("foo").arg("--bin=bar"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [REMOVING] [..]bar[..]
 "));
 
@@ -627,7 +627,7 @@ test!(uninstall_piecemeal {
     assert_that(cargo_home(), is_not(has_installed_exe("bar")));
 
     assert_that(cargo_process("uninstall").arg("foo").arg("--bin=foo"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [REMOVING] [..]foo[..]
 "));
     assert_that(cargo_home(), is_not(has_installed_exe("foo")));
@@ -683,7 +683,7 @@ test!(do_not_rebuilds_on_local_install {
     assert_that(p.cargo_process("build").arg("--release"),
                 execs().with_status(0));
     assert_that(cargo_process("install").arg("--path").arg(p.root()),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [INSTALLING] [..]
 ").with_stderr("\
 warning: be sure to add `[..]` to your PATH to be able to run the installed binaries
index 216c3964301f1688c3cc033d7fa75d0fc942c64f..8d03715cb81340e0b9f2727880efa098d3c89147 100644 (file)
@@ -41,7 +41,7 @@ test!(override_simple {
         ");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `file://[..]`
 [UPDATING] git repository `[..]`
 [COMPILING] foo v0.1.0 (file://[..])
@@ -135,7 +135,7 @@ test!(transitive {
         .file("src/lib.rs", "");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `file://[..]`
 [UPDATING] git repository `[..]`
 [DOWNLOADING] bar v0.2.0 (registry [..])
@@ -181,7 +181,7 @@ test!(persists_across_rebuilds {
         ");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `file://[..]`
 [UPDATING] git repository `file://[..]`
 [COMPILING] foo v0.1.0 (file://[..])
@@ -226,7 +226,7 @@ test!(replace_registry_with_path {
         ");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `file://[..]`
 [COMPILING] foo v0.1.0 (file://[..])
 [COMPILING] local v0.0.1 (file://[..])
@@ -281,7 +281,7 @@ test!(use_a_spec_to_select {
         ");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `file://[..]`
 [UPDATING] git repository `[..]`
 [DOWNLOADING] [..]
@@ -326,7 +326,7 @@ test!(override_adds_some_deps {
         .file("src/lib.rs", "");
 
     assert_that(p.cargo_process("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `file://[..]`
 [UPDATING] git repository `[..]`
 [DOWNLOADING] foo v0.1.1 (registry [..])
@@ -339,11 +339,11 @@ test!(override_adds_some_deps {
 
     Package::new("foo", "0.1.2").publish();
     assert_that(p.cargo("update").arg("-p").arg(&format!("{}#bar", foo.url())),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] git repository `file://[..]`
 "));
     assert_that(p.cargo("update").arg("-p").arg(&format!("{}#bar", registry())),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `file://[..]`
 "));
 
index 6cd97c1efd56d249e13efcf0b80e013bbe6419dd..5ed7b62c69e3ef99d5d72db53276fedc473ff500 100644 (file)
@@ -152,7 +152,7 @@ test!(package_verbose {
 
     println!("package main repo");
     assert_that(cargo.clone().arg("package").arg("-v").arg("--no-verify"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [PACKAGING] foo v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -161,7 +161,7 @@ test!(package_verbose {
     println!("package sub-repo");
     assert_that(cargo.arg("package").arg("-v").arg("--no-verify")
                      .cwd(p.root().join("a")),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [PACKAGING] a v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -206,7 +206,7 @@ test!(exclude {
         .file("src/bar.txt", "");
 
     assert_that(p.cargo_process("package").arg("--no-verify").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [PACKAGING] foo v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -230,7 +230,7 @@ test!(include {
         .file("src/bar.txt", ""); // should be ignored when packaging
 
     assert_that(p.cargo_process("package").arg("--no-verify").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [PACKAGING] foo v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
@@ -269,7 +269,7 @@ test!(package_new_git_repo {
 
     assert_that(::cargo_process().arg("package").cwd(p.root())
                  .arg("--no-verify").arg("-v"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [PACKAGING] foo v0.0.1 ([..])
 [ARCHIVING] [..]
 [ARCHIVING] [..]
index e438b5d277ae16046b176871204e239d76ed012a..ab103a6c9a1bd7701270b2c8f99cde03d4e3f3ba 100644 (file)
@@ -430,7 +430,7 @@ test!(update_with_lockfile_if_packages_missing {
 
     paths::home().join(".cargo/registry").rm_rf().unwrap();
     assert_that(p.cargo("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `[..]`
 [DOWNLOADING] bar v0.0.1 (registry file://[..])
 "));
@@ -461,7 +461,7 @@ test!(update_lockfile {
     println!("0.0.2 update");
     assert_that(p.cargo("update")
                  .arg("-p").arg("bar").arg("--precise").arg("0.0.2"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `[..]`
 [UPDATING] bar v0.0.1 (registry file://[..]) -> v0.0.2
 "));
@@ -478,7 +478,7 @@ test!(update_lockfile {
     println!("0.0.3 update");
     assert_that(p.cargo("update")
                  .arg("-p").arg("bar"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `[..]`
 [UPDATING] bar v0.0.2 (registry file://[..]) -> v0.0.3
 "));
@@ -497,7 +497,7 @@ test!(update_lockfile {
    Package::new("spam", "0.2.5").publish();
    assert_that(p.cargo("update")
                 .arg("-p").arg("bar"),
-               execs().with_status(0).with_stdout("\
+               execs().with_status(0).with_stderr("\
 [UPDATING] registry `[..]`
 [UPDATING] bar v0.0.3 (registry file://[..]) -> v0.0.4
 [ADDING] spam v0.2.5 (registry file://[..])
@@ -507,7 +507,7 @@ test!(update_lockfile {
    Package::new("bar", "0.0.5").publish();
    assert_that(p.cargo("update")
                 .arg("-p").arg("bar"),
-               execs().with_status(0).with_stdout("\
+               execs().with_status(0).with_stderr("\
 [UPDATING] registry `[..]`
 [UPDATING] bar v0.0.4 (registry file://[..]) -> v0.0.5
 [REMOVING] spam v0.2.5 (registry file://[..])
@@ -735,7 +735,7 @@ test!(fetch_downloads {
 
     assert_that(p.cargo("fetch"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [UPDATING] registry `[..]`
 [DOWNLOADING] a v0.1.0 (registry [..])
 "));
@@ -765,14 +765,14 @@ test!(update_transitive_dependency {
 
     assert_that(p.cargo("update").arg("-pb"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [UPDATING] registry `[..]`
 [UPDATING] b v0.1.0 (registry [..]) -> v0.1.1
 "));
 
     assert_that(p.cargo("build"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [DOWNLOADING] b v0.1.1 (registry file://[..])
 [COMPILING] b v0.1.1 (registry [..])
 [COMPILING] a v0.1.0 (registry [..])
@@ -811,7 +811,7 @@ test!(update_backtracking_ok {
 
     assert_that(p.cargo("update").arg("-p").arg("hyper"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [UPDATING] registry `[..]`
 "));
 });
@@ -845,7 +845,7 @@ test!(update_multiple_packages {
 
     assert_that(p.cargo("update").arg("-pa").arg("-pb"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [UPDATING] registry `[..]`
 [UPDATING] a v0.1.0 (registry [..]) -> v0.1.1
 [UPDATING] b v0.1.0 (registry [..]) -> v0.1.1
@@ -853,7 +853,7 @@ test!(update_multiple_packages {
 
     assert_that(p.cargo("update").arg("-pb").arg("-pc"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [UPDATING] registry `[..]`
 [UPDATING] c v0.1.0 (registry [..]) -> v0.1.1
 "));
@@ -982,7 +982,7 @@ test!(only_download_relevant {
     Package::new("baz", "0.1.0").publish();
 
     assert_that(p.cargo("build"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [UPDATING] registry `[..]`
 [DOWNLOADING] baz v0.1.0 ([..])
 [COMPILING] baz v0.1.0 ([..])
index 942c99aa3a0bc63721a1ab9b82b11f74e77e73c9..ab72e819b0ff374f1e9de3d0b559a473083f2638 100644 (file)
@@ -283,7 +283,7 @@ test!(build_only_bar_dependency {
                 .arg("--").arg("-Z").arg("unstable-options"),
                 execs()
                 .with_status(0)
-                .with_stdout("\
+                .with_stderr("\
 [COMPILING] bar v0.1.0 ([..])
 [RUNNING] `[..]--crate-name bar --crate-type lib [..] -Z unstable-options [..]`
 "));
index cf6f50e8d45df1c24f0115aa24eaaa04cf2499ca..9706d169a066c4deafafeda828d73903fb2ba03f 100644 (file)
@@ -1528,7 +1528,7 @@ test!(example_with_dev_dep {
 
     assert_that(p.cargo_process("test").arg("-v"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [..]
 [..]
 [..]
@@ -1981,7 +1981,7 @@ test!(bin_does_not_rebuild_tests {
 
     assert_that(p.cargo("test").arg("-v").arg("--no-run"),
                 execs().with_status(0)
-                       .with_stdout("\
+                       .with_stderr("\
 [COMPILING] foo v0.0.1 ([..])
 [RUNNING] `rustc src[..]main.rs [..]`
 [RUNNING] `rustc src[..]main.rs [..]`
@@ -2040,7 +2040,7 @@ test!(selective_test_optional_dep {
 
     assert_that(p.cargo("test").arg("-v").arg("--no-run")
                  .arg("--features").arg("a").arg("-p").arg("a"),
-                execs().with_status(0).with_stdout("\
+                execs().with_status(0).with_stderr("\
 [COMPILING] a v0.0.1 ([..])
 [RUNNING] `rustc a[..]src[..]lib.rs [..]`
 [RUNNING] `rustc a[..]src[..]lib.rs [..]`